package com.abluedog.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
import net.minecraft.network.ClientConnection;
import net.minecraft.server.network.ConnectedClientData;
import net.minecraft.server.network.ServerPlayerEntity;



public interface PlayerConnectionCallBack {

    Event<After> After = EventFactory.createArrayBacked(After.class,
            (listeners) -> (connection, player, clientData) -> {
                for (After event : listeners) {
                    event.afterPlayerConnect(connection, player, clientData);
                }
            });

    @FunctionalInterface
    public interface After {
        void afterPlayerConnect(ClientConnection connection, ServerPlayerEntity player, ConnectedClientData clientData);
    }
}
